Skip to content

Remove NSMutableParagraphStyle for heading#429

Merged
tomekzaw merged 1 commit intomainfrom
@tomekzaw/remove-h1-ns-paragraph-style
Jul 15, 2024
Merged

Remove NSMutableParagraphStyle for heading#429
tomekzaw merged 1 commit intomainfrom
@tomekzaw/remove-h1-ns-paragraph-style

Conversation

@tomekzaw
Copy link
Copy Markdown
Collaborator

@tomekzaw tomekzaw commented Jul 15, 2024

Details

This PR removes code logic that adds NSMutableParagraphStyle around h1 heading on iOS. This part of code is redundant as we don't set any styles on paragraphs.

Also, removing NSMutableParagraphStyle improves the performance when typing fast, as seen on the comparision below:

Before After
before.mp4
after.mp4

Related Issues

Partially fixes #417

Manual Tests

Linked PRs

@tomekzaw tomekzaw requested a review from BartoszGrajdek July 15, 2024 07:12
Copy link
Copy Markdown
Contributor

@BartoszGrajdek BartoszGrajdek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 😄

@tomekzaw tomekzaw merged commit d37974e into main Jul 15, 2024
@tomekzaw tomekzaw deleted the @tomekzaw/remove-h1-ns-paragraph-style branch July 15, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot select single words on first attempt in text with headings or blockquotes on iOS

2 participants